#!/usr/bin/env ruby

require 'set'

VMSTAT_COUNTERS = Set.new %w(

interleave_hit
local_node
other_node

numa_hit
numa_miss
numa_foreign
numa_interleave
numa_local
numa_other

nr_vmscan_write
nr_vmscan_immediate_reclaim
nr_throttled_written
nr_dirtied
nr_written

pgpromote_success
pgpromote_candidate
pgdemote_kswapd
pgdemote_direct
pgdemote_khugepaged

pgpgin
pgpgout
pswpin
pswpout
pgalloc_dma
pgalloc_dma32
pgalloc_normal
pgalloc_movable
pgalloc_device
allocstall_dma
allocstall_dma32
allocstall_normal
allocstall_movable
allocstall_device
pgskip_dma
pgskip_dma32
pgskip_normal
pgskip_movable
pgskip_device
pgfree
pgactivate
pgdeactivate
pglazyfree
pgfault
pgmajfault
pglazyfreed
pgrefill
pgreuse
pgsteal_kswapd
pgsteal_direct
pgsteal_khugepaged
pgscan_kswapd
pgscan_direct
pgscan_khugepaged
pgscan_direct_throttle
pgscan_anon
pgscan_file
pgsteal_anon
pgsteal_file
zone_reclaim_failed
pginodesteal
slabs_scanned
kswapd_inodesteal
kswapd_low_wmark_hit_quickly
kswapd_high_wmark_hit_quickly
pageoutrun
pgrotated
drop_pagecache
drop_slab
oom_kill
numa_pte_updates
numa_huge_pte_updates
numa_hint_faults
numa_hint_faults_local
numa_pages_migrated
pgmigrate_success
pgmigrate_fail
thp_migration_success
thp_migration_fail
thp_migration_split
compact_migrate_scanned
compact_free_scanned
compact_isolated
compact_stall
compact_fail
compact_success
compact_daemon_wake
compact_daemon_migrate_scanned
compact_daemon_free_scanned
htlb_buddy_alloc_success
htlb_buddy_alloc_fail
cma_alloc_success
cma_alloc_fail
unevictable_pgs_culled
unevictable_pgs_scanned
unevictable_pgs_rescued
unevictable_pgs_mlocked
unevictable_pgs_munlocked
unevictable_pgs_cleared
unevictable_pgs_stranded
thp_fault_alloc
thp_fault_fallback
thp_fault_fallback_charge
thp_collapse_alloc
thp_collapse_alloc_failed
thp_file_alloc
thp_file_fallback
thp_file_fallback_charge
thp_file_mapped
thp_split_page
thp_split_page_failed
thp_deferred_split_page
thp_split_pmd
thp_scan_exceed_none_pte
thp_scan_exceed_swap_pte
thp_scan_exceed_share_pte
thp_split_pud
thp_zero_page_alloc
thp_zero_page_alloc_failed
thp_swpout
thp_swpout_fallback
balloon_inflate
balloon_deflate
balloon_migrate
nr_tlb_remote_flush
nr_tlb_remote_flush_received
nr_tlb_local_flush_all
nr_tlb_local_flush_one
swap_ra
swap_ra_hit
ksm_swpin_copy
cow_ksm
zswpin
zswpout
zswpwb
direct_map_level2_splits
direct_map_level3_splits
vma_lock_success
vma_lock_abort
vma_lock_retry
vma_lock_miss
)
